package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EaProductGenuineMapper;
import com.ruoyi.system.domain.EaProductGenuine;
import com.ruoyi.system.service.IEaProductGenuineService;

/**
 * 集采道地药材清单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-22
 */
@Service
public class EaProductGenuineServiceImpl implements IEaProductGenuineService 
{
    @Autowired
    private EaProductGenuineMapper eaProductGenuineMapper;

    /**
     * 查询集采道地药材清单
     * 
     * @param id 集采道地药材清单主键
     * @return 集采道地药材清单
     */
    @Override
    public EaProductGenuine selectEaProductGenuineById(Integer id)
    {
        return eaProductGenuineMapper.selectEaProductGenuineById(id);
    }

    /**
     * 查询集采道地药材清单列表
     * 
     * @param eaProductGenuine 集采道地药材清单
     * @return 集采道地药材清单
     */
    @Override
    public List<EaProductGenuine> selectEaProductGenuineList(EaProductGenuine eaProductGenuine)
    {
        return eaProductGenuineMapper.selectEaProductGenuineList(eaProductGenuine);
    }

    /**
     * 新增集采道地药材清单
     * 
     * @param eaProductGenuine 集采道地药材清单
     * @return 结果
     */
    @Override
    public int insertEaProductGenuine(EaProductGenuine eaProductGenuine)
    {
        eaProductGenuine.setCreateTime(DateUtils.getNowDate());
        return eaProductGenuineMapper.insertEaProductGenuine(eaProductGenuine);
    }

    /**
     * 修改集采道地药材清单
     * 
     * @param eaProductGenuine 集采道地药材清单
     * @return 结果
     */
    @Override
    public int updateEaProductGenuine(EaProductGenuine eaProductGenuine)
    {
        eaProductGenuine.setUpdateTime(DateUtils.getNowDate());
        return eaProductGenuineMapper.updateEaProductGenuine(eaProductGenuine);
    }

    /**
     * 批量删除集采道地药材清单
     * 
     * @param ids 需要删除的集采道地药材清单主键
     * @return 结果
     */
    @Override
    public int deleteEaProductGenuineByIds(Integer[] ids)
    {
        return eaProductGenuineMapper.deleteEaProductGenuineByIds(ids);
    }

    /**
     * 删除集采道地药材清单信息
     * 
     * @param id 集采道地药材清单主键
     * @return 结果
     */
    @Override
    public int deleteEaProductGenuineById(Integer id)
    {
        return eaProductGenuineMapper.deleteEaProductGenuineById(id);
    }
}
